home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / PROGRAMR / 3DLIB25.ZIP / PROJECT3.INT < prev    next >
Text File  |  1993-12-26  |  4KB  |  74 lines

  1. (******************************************************************************
  2. *                                  project3                                   *
  3. ******************************************************************************)
  4. unit project3;
  5.  
  6. (*******************************************************************************
  7. *      this unit has 2 instances : the first one is used with the windows      *
  8. *               graphic user interface, and the other does not,                *
  9. *                                                                              *
  10. *             +-------------------------------------------------+              *
  11. *             |  this unit is NOT interfaced to the window GUI, |              *
  12. *             |   for use on a bare screen ONLY - for runTime!  |              *
  13. *             |                ****                             |              *
  14. *             +-------------------------------------------------+              *
  15. *                                                                              *
  16. *this unit handles the 3d -> 2d projections, we use 2 different methods        *
  17. *       of projections :                                                       *
  18. *                                                                              *
  19. *               A : axonometric projections, no perspective due to             *
  20. *                       distance is performed, the general way                 *
  21. *                       we can look at the coordinate system is as             *
  22. *                       follows :                                              *
  23. *                                                                              *
  24. *                               |  z axis                                      *
  25. *                               |                                              *
  26. *                              / \                                             *
  27. *                    x axis   /   \  y axis                                    *
  28. *                                                                              *
  29. *               B : perspective projections : the normal eye perspective       *
  30. *                       projection is performed, we can look at the 3d         *
  31. *                       universe we are refering to as a cube of               *
  32. *                       1000 x 1000 x 1000 integer locations, with             *
  33. *                       the x axis, and y axis parallel to the screen          *
  34. *                       x, y axis respectivly, and the z axis going into       *
  35. *                       the screen.                                            *
  36. *                                                                              *
  37. *                       we will look at the coordinate system as follows :     *
  38. *                                                                              *
  39. *                       │ Y axis                                               *
  40. *                       │                                                      *
  41. *                Z axis x------ X axis                                         *
  42. *                                                                              *
  43. *                                                                              *
  44. *******************************************************************************)
  45.  
  46. interface
  47.  
  48. uses  
  49. {$ifndef windows}  
  50.    graph,
  51. {$endif}
  52.    hdr3d
  53.    ;
  54.  
  55. const
  56.         perspective     : boolean = false; 
  57.         {true = perspective, else = axonometric}
  58. {$ifndef windows}
  59. var
  60.     MaxX, MaxY : word;          { In pixels for graphics screen }
  61.     MaxColor   : word;
  62.     GraphDriver           : integer;
  63.     GraphMode             : integer;
  64. {$endif}
  65.  
  66. procedure calcPoint(p3d : point3d; var psc : screenPoints);
  67. procedure setPerspective;
  68. procedure resetPerspective;
  69. procedure togglePerspective;
  70.  
  71. implementation
  72.  
  73. end.
  74.